cmake_minimum_required(VERSION 3.16)
project(replay_encoder)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

add_library(replay_encoder SHARED
    NapiBridge.cpp
    ReplayEncoder.cpp
)

target_include_directories(replay_encoder PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}
)

# 链接多媒体与 NAPI 相关库（名称可能需按实际 SDK 调整）
find_library(NAPI_LIB ace_napi REQUIRED)
find_library(MEDIA_NATIVE avcodec REQUIRED)
find_library(MEDIA_MUXER avmuxer REQUIRED)

target_link_libraries(replay_encoder
    ${NAPI_LIB}
    ${MEDIA_NATIVE}
    ${MEDIA_MUXER}
)


